﻿<CodeSnippet>
@(@"<DxTagBox Data=""@Data""
          FilteringMode=""@FilteringMode""
          @bind-Values=""@Values""
          TextFieldName=""@nameof(Country.CountryName)"">
</DxTagBox>

@code {
    IEnumerable<Country> Data { get; set; }
    IEnumerable<Country> Values { get; set; }
    DataGridFilteringMode FilteringMode { get; set; } = DataGridFilteringMode.StartsWith;

    protected override async Task OnInitializedAsync()
    {
        Data = await CountryNamesService.LoadAsync();
        SelectedItems = Data.Where(x => x.CountryName == ""United Kingdom"" || x.CountryName == ""United States"");
    }
}")
</CodeSnippet>
